package cn.yunyichina.provider.iface.entity.alipay;

import lombok.Data;

import java.io.Serializable;

/**
 * Created by Lullaby on 2017/1/10.
 */
@Data
public class AlipayWebpayMedicalCardQueryResponse implements Serializable {

    private AlipayCommerceMedicalCardQueryResponse alipayCommerceMedicalCardQueryResponse;

    @Data
    public static final class AlipayCommerceMedicalCardQueryResponse extends AlipayResponse implements Serializable {

        private String agreementNo;

        private String buyerLogonId;

        private String buyerUserId;

        private String cardOrgName;

        private String cardOrgNo;

        private String city;

        private String extendParams;

        private String gmtSign;

        private String medicalCardId;

        private String medicalCardNo;

        private String medicalCardType;

        private String signStatus;

    }

    private String sign;

    public boolean isSuccess(AlipayCommerceMedicalCardQueryResponse queryResponse) {
        return "10000".equals(queryResponse.getCode()) && "Success".equals(queryResponse.getMsg()) && "signed".equals(queryResponse.getSignStatus());
    }

}
